package funcionarios;

import java.util.ArrayList;
import java.util.Date;

public class Horario {
	private int horaI;
	private int horaF;
	private String dia;
	
	public Horario(String dia, int horaI, int horaF) throws Exception{
		this.horaI = horaI;
		this.horaF = horaF;
		dia = dia.toLowerCase();
		if(dia.equals(Dias.SEGUNDA.getDia()) || dia.equals(Dias.TERCA.getDia()) || dia.equals(Dias.QUARTA.getDia())
				|| dia.equals(Dias.QUINTA.getDia()) || dia.equals(Dias.SEXTA.getDia())){
			this.dia = dia;
		}else{
			throw new Exception("Dia invalido");
		}
		
	}
	
	public int getHoraI(){
		return horaI;
	}
	public void setHoraI(int horaI){
		this.horaI = horaI;
	}
	public int getHoraF(){
		return horaF;
	}
	public void setHoraF(int horaF){
		this.horaF = horaF;
	}

	public String toString(){
		return dia + " - " + horaI + " ate " + horaF;
	}


	public String getDia(){
		return dia;
	}
	public void setDia(String dia) throws Exception{
		dia = dia.toLowerCase();
		if(dia.equals(Dias.SEGUNDA.getDia()) || dia.equals(Dias.TERCA.getDia()) || dia.equals(Dias.QUARTA.getDia())
				|| dia.equals(Dias.QUINTA.getDia()) || dia.equals(Dias.SEXTA.getDia())){
			this.dia = dia;
		}else{
			throw new Exception("Dia invalido");
		}
		
	}
	
}
